import { Message } from '@arco-design/web-vue'

// 配置
const config = {
  duration: 2000
}

// 封装消息组件
const message = {
  info: (content: string) => {
    Message.info({
      content,
      ...config
    })
  },
  success: (content: string) => {
    Message.success({
      content,
      ...config
    })
  },
  warning: (content: string) => {
    Message.warning({
      content,
      ...config
    })
  },
  error: (content: string) => {
    Message.error({
      content,
      ...config
    })
  }
}

export default message
